package com.gusto.engine.semsim.neighborhood;

import com.gusto.engine.beans.model.Res;
import com.gusto.engine.semsim.service.SimilarityService;

/**
 * <p>Semantic system event listener.
 * Used by the aspect to inject all the events arising from {@link SimilarityService}.</p>
 * 
 * @author amokrane.belloui@gmail.com
 *
 */
public interface SemEventListener {
	
	/**
	 * On the calculation of a similarity
	 * @param context
	 * @param resource1
	 * @param resource2
	 * @param sim
	 */
	public void similarityCalculated(String context, Res resource1, Res resource2, Double sim);
	
	/**
	 * On a context configuration changed
	 * @param context
	 * @throws Throwable
	 */
	public void contextConfigChanged(String context) throws Throwable;
    
}
